package com.example.routeplansystem.entity.po;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Objects;


/**
 * 节点实体类
 */

@Data
@ApiModel
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class NodePojo {

    @ApiModelProperty("点Id") private Integer nodeId;

    @ApiModelProperty("用户Id") private Integer userId;

    @ApiModelProperty("客户Id") private Integer clientId;

    @ApiModelProperty("点名称") private String nodeName;

    @ApiModelProperty("点详细地址") private String nodeAddress;

    @ApiModelProperty("纬度") private double lat;

    @ApiModelProperty("经度") private double lng;

    @ApiModelProperty("删除标志") private int delFlag;

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        NodePojo nodePojo = (NodePojo) o;
        return Objects.equals(nodeId, nodePojo.nodeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nodeId);
    }
}
